package com.ruoyi.system.mapper;

import com.ruoyi.system.domain.HatchetMerchant;
import com.ruoyi.system.vo.AgentMerchantChangeVo;

import java.util.List;

import org.apache.ibatis.annotations.Param;	

/**
 * 商户列 数据层
 * 
 * @author ruoyi
 * @date 2019-02-18
 */
public interface HatchetMerchantMapper 
{
	/**
     * 查询商户列信息
     * 
     * @param iD 商户列ID
     * @return 商户列信息
     */
	public HatchetMerchant selectHatchetMerchantById(String iD);
	
	/**
     * 查询商户列列表
     * 
     * @param hatchetMerchant 商户列信息
     * @return 商户列集合
     */
	public List<HatchetMerchant> selectHatchetMerchantList(HatchetMerchant hatchetMerchant);
	
	/**
     * 新增商户列
     * 
     * @param hatchetMerchant 商户列信息
     * @return 结果
     */
	public int insertHatchetMerchant(HatchetMerchant hatchetMerchant);
	
	/**
     * 修改商户列
     * 
     * @param hatchetMerchant 商户列信息
     * @return 结果
     */
	public int updateHatchetMerchant(HatchetMerchant hatchetMerchant);
	
	/**
     * 删除商户列
     * 
     * @param iD 商户列ID
     * @return 结果
     */
	public int deleteHatchetMerchantById(String iD);
	
	/**
     * 批量删除商户列
     * 
     * @param iDs 需要删除的数据ID
     * @return 结果
     */
	public int deleteHatchetMerchantByIds(String[] iDs);

	public HatchetMerchant selectHatchetMerchantByNo(String merchantNo);
	
	/**
	 * 代理商查询所有商户
	 * @param hatchetMerchant
	 * @return
	 */
	public List<HatchetMerchant> selectHatchetMerchantForDLS(HatchetMerchant hatchetMerchant);

	public List<HatchetMerchant> selectMerByPhone(String pHONE);
	
	
	
	/**
	 * 代理商查询下属商户数量
	 * @param departmentCode
	 * @return
	 */
	public Long selectHatchetMerchantCountForDLS(HatchetMerchant hatchetMerchant);
	
	/**
	 * 代理商查询下属激活商户数量
	 * @param departmentCode
	 * @return
	 */
	public Long selectActivHatchetMerchantCountForDLS(HatchetMerchant hatchetMerchant);
	
	/**
	 * 代理商查询下属商户 返回商户财务列表
	 * @param hatchetMerchant
	 * @return
	 */
	public List<AgentMerchantChangeVo> selectUnderMoneyForDLS(HatchetMerchant hatchetMerchant);
	
	/**
	 * 每月一号定时清理经纪人月贡献
	 */
	public void cleanMerMonMoney(@Param("defaultVule")String defaultVule);
	
	/**
	 * 查询经理人信息
	 * @param hatchetMerchant
	 * @return
	 */
	public List<HatchetMerchant> selectJLR(HatchetMerchant hatchetMerchant);
	
	/**
	 * 查询经理人申请表
	 */
	public List<HatchetMerchant> selectJLR();
	
	/**
	 * 高级经纪人查询托管卡用户列表
	 * @param hatchetMerchant
	 * @return
	 */
	public List<HatchetMerchant> selectHatchetMerchantForJLR(HatchetMerchant hatchetMerchant);

	public List<HatchetMerchant> selectAllMerchant();
}